package com.t114514.demo.service.impl;

import com.t114514.demo.mapper.StudentMapper;
import com.t114514.demo.pojo.Student;
import com.t114514.demo.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class StudentServiceImpl implements StudentService {

    @Autowired
    private StudentMapper studentMapper;

    @Override
    public Student findStudent(String studentAccount) {
        return studentMapper.selectStudent(studentAccount);
    }

    @Override
    public void addStudent(String studentAccount, String password, String studentName) {
        studentMapper.insertStudent(studentAccount, password,studentName);
    }

    @Override
    public void modifyStudent(Student student) {
        studentMapper.updateStudent(student);
    }
}
